<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <strong v-for="wife in wifes">{{wife}} </strong>
        <button @click="clickFn">click</button>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>

    /* vue变更过的数组api 他们可以触发vue的响应式更新
        push()
        pop()
        shift()
        unshift()
        splice()
        sort()
        reverse()
    */

    new Vue({
        el:"#app",
        data:{
           wifes:["周冬雨","迪丽热巴","古力娜扎"]
        },
        methods:{
            clickFn(){
                // 当你利用索引直接设置一个数组项时
                // this.wifes[2] = "哈尼克制"
                //当你修改数组的长度时
                // this.wifes.length = 0;

                // Vue.set(this.wifes,"2","哈尼克制")
            }
        }
    })
</script>
</html>